You are here: 1. Distribution System > 1.9. REPORTS Menu > 1.9.2. Reports - Report Generator > 1.9.2.7. Report Generator - Edit Menu > Edit - Add Field > Adding Variable Fields
Adding Variable Fields

Report variables are the names of fields contained in your data files. Every field within a file has a unique variable name. For example, typical Debtor master file fields are the debtor's ID, name, class, balances, date created, etc. These are all variables. They contain the actual information in the files.

Variables are typically added to the Detail section of a report since this is where data from files ‘repeats’. Variables cannot be added to Question sections.

In a one-to-many relationship, the Page Header part of the report would contain variables from the Header file and the Detail section would contain information from the Detail file. For example, an invoice format showing Page Header information from the Debtors Invoice Header file would display the Debtor Code and Debtor Name, whereas the Detail section would contain information from the Debtors Invoice Line file such as the item(s) on the invoice.

To add a variable field to a report:

  1. Display the Select Field Type screen.

Refer to "Edit - Add Field".

  1. Select the Variable option then select OK.

Micronet displays the Edit Variable screen.

 

Technical Tip

You can display this screen quickly by selecting the Field Tool on the Report Generator toolbar and then clicking on the report where you want the variable field to be added.

  1. Complete the following fields:

 

Field

Value

 

File

Micronet displays the file which contains the variable to be displayed. This depends on the report you are creating or editing.

 

Relation

Select a relation on which the variable is based, i.e. the field only appears when that relation is in use.

 

Variable

Select the field to be displayed.

 

Description

Enter the description to be displayed in the page header if Copy to DH is set to Yes.

 

Width (Grid Units)

Enter the length of the field on the report in grid units. This defaults to the maximum size the field can be (as pre-set in Micronet).

 

Decimal

Enter the number of decimal places to be displayed.

 

Comma

Select Yes if you want commas inserted to break up numbers in thousands, or No if you don't.

 

Bracket

Select Yes if you want brackets inserted around negative numbers, or No if you don't.

 

Prefix Dollar

Select Yes if you want this field prefixed with a $ symbol, or No if you don't.

 

Justification

Select whether output is to be left justified, centred or right justified.

 

Print Logic

Enter any condition where the field is to be displayed if the condition is valid.

For example, this would be used in the invoice format where you only want the Sales Tax field to be shown if the debtor is a wholesale debtor. Therefore in the Print Logic field of the Sales Tax field on the report, you would enter:

DBT_RETAIL = =  'W'.

This will only print the field when the debtor is a wholesale debtor.

0 = Does not print

 

Control Level

Enter the control break level for the data to be displayed.

For more information about control breaks, refer to "Options - Control Breaks".

 

Copy to DH

Select Yes if you want to make a text field using the Description as the column heading and placing it in the page header.

 

Copy to DF

Select Yes if you want to add an accumulator to the page footer for this variable.

 

Copy to RF

Select Yes if you want to add an accumulator to the report footer for this variable.

 

Print Table

 

 

Under Line

Select whether you want a single or double line to be printed on the report before or after your variable field, or select No for no line.

 

Grow Height

Select Yes if you want to wrap text where the data does not fit in the field, or No if you don't.

  1. Optionally, you can add a drill to the variable field.

Refer to "Adding a Drill for a Variable Field ".

  1. Select the Accept button.

Micronet redisplays the Report Generator screen for the selected report. If you used the Field Tool to insert the variable field, the field displays where you clicked.

If you used menu options to insert the variable field, Micronet displays a rectangle which moves with the cursor.

  1. Move the rectangle where you want your variable field to be printed and then click.

Micronet inserts the variable field on the report where you clicked.

  1. You can move the variable field by clicking the Select Tool on the Report Generator toolbar, clicking inside the field you just added and then dragging it to the required position on the report.

  1. To edit the field you just added, refer to "Edit - Edit Field".
  2. To delete the field you just added, refer to "Edit - Delete Field".